package com.sleep.ruledemo.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * @ClassName LogHandler
 * @Description TODO
 * @Author 郭敖
 * @Date 2024年05月07日 18:54
 * @Version 1.0
 */
@Component
@Aspect
@Slf4j
public class LogHandler {
    @Before("@annotation(myLog)")
    public void log(JoinPoint joinPoint,MyLog myLog){
        log.warn("LogAop starting ...  value {}",myLog.value());
    }
}
